import axios from "../../index";
const baseurl = '/api'
const api = {
  getList(params) {
    return axios.get(`${baseurl}/list`, params);
  },
  register(data) {
    return axios.post(`${baseurl}/register`, data);
  },
  login(data) {
    return axios.post(`${baseurl}/login`, data);
  },
  heroList(params) {
    return axios.get(`/hero/list`, params);
  },
  addHero(data) {
    return axios.post(`/hero/add`, data);
  },
  editHero(data) {
    return axios.put(`/hero/edit`, data);
  }
};
export default api;
